﻿<%@ page language="java" import="java.util.*"
	contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<!DOCTYPE html>
<html>
	<head>
		<title>用户信息</title>
		<t:base type="jquery,easyui,tools"></t:base>
		<script type="text/javascript">
			$(function() {
				$('#cc').combotree({
					url : 'systemController.do?setPFunction',
					width:160
				});
			});
		</script>
	</head>
	<body style="overflow-y: hidden" scroll="no">
		<t:formvalid formid="formobj" dialog="true" usePlugin="password"
			layout="table" action="userController.do?saveUser">
			<input id="id" name="id" type="hidden" value="${user.id }">
			<input id="usertype" name="usertype" type="hidden" value="${user.usertype}">
			<table style="width: 600px;" cellpadding="0" cellspacing="1"
				class="formtable">
				
				<tr>
					<td align="right" width="15%" nowrap>
						<label class="Validform_label">
							用户名:
						</label>
					</td>
					<td class="value" width="85%">
						<c:if test="${user.id!=null }">
    						${user.userName }
    					</c:if>
						<c:if test="${user.id==null }">
							<input id="userName" class="inputxt" name="userName"
								ajaxurl="userController.do?checkUser&code=${user.userName}"
								value="${user.userName }" datatype="s2-30">
							<span class="Validform_checktip">用户名范围在2~30位字符</span>
						</c:if>
					</td>
				</tr>
				<c:if test="${user.id==null }">
					<tr>
						<td align="right" width="15%" nowrap>
							<label class="Validform_label">
								密码:
							</label>
						</td>
						<td class="value" width="85%">	
							<input type="password" name="password" value="" class="inputxt" datatype="*"/>	
							<span class="Validform_checktip">用户名范围在2~30位字符</span>							
						</td>
					</tr>
				</c:if>
				
				<tr>
					<td align="right" width="10%" nowrap>
						<label class="Validform_label">
							真实姓名:
						</label>
					</td>
					<td class="value" width="10%">
						<input id="realName" class="inputxt" name="realName"
							value="${user.realName }" datatype="s2-10">
						<span class="Validform_checktip">填写个人真实姓名</span>
					</td>
				</tr>
				
				<tr>
					<td align="right" width="10%" nowrap>
						<label class="Validform_label">
							身份证:
						</label>
					</td>
					<td class="value" width="10%">
						<input id="identity" class="inputxt" name="identity" ignore="ignore"
							value="${user.identity}" datatype="s15-18">
						<span class="Validform_checktip">填写个人身份证</span>
					</td>
				</tr>
				
				<tr >
					<td align="right">
						<label class="Validform_label">
							部门:
						</label>
					</td>
					<td class="value" >
						<input id="cc" name="TSDepart.id" value="${user.TSDepart.id}" >
					</td>
				</tr>
				
				<tr>
					<td align="right">
						<label class="Validform_label">
							角色:
						</label>
					</td>
					<td class="value" nowrap>					
						<input name="roleid" name="roleid" type="hidden" value="${id}"
							id="roleid">
						<input name="roleName" class="inputxt" value="${roleName}"
							id="roleName" readonly="readonly" datatype="*" />
						<t:choose hiddenName="roleid" hiddenid="id" 
							url="userController.do?roles" name="roleList" icon="icon-choose"
							title="角色列表" textname="roleName" isclear="true"></t:choose>
						<span class="Validform_checktip">角色可多选</span>
					</td>
				</tr>
				<tr>
					<td align="right" nowrap>
						<label class="Validform_label">
							手机号码:
						</label>
					</td>
					<td class="value">
						<!-- update-begin--Author:chenxu  Date:20130318 for：手机号无法保存和修改  -->
						<input class="inputxt" name="mobilePhone"
							value="${user.mobilePhone}" datatype="m" errormsg="手机号码不正确!"
							ignore="ignore">
						<!-- update-end--Author:chenxu  Date:20130318 for：手机号无法保存和修改  -->
						<span class="Validform_checktip"></span>
					</td>
				</tr>
				<tr>
					<td align="right">
						<label class="Validform_label">
							办公电话:
						</label>
					</td>
					<td class="value">
						<input class="inputxt" name="officePhone"
							value="${user.officePhone}" datatype="n" errormsg="办公室电话不正确!"
							ignore="ignore">
						<span class="Validform_checktip"></span>
					</td>
				</tr>
				<tr>
					<td align="right">
						<label class="Validform_label">
							常用邮箱:
						</label>
					</td>
					<td class="value">
						<input class="inputxt" name="email" value="${user.email}"
							datatype="e" errormsg="邮箱格式不正确!" ignore="ignore">
						<span class="Validform_checktip"></span>
					</td>
				</tr>
				<tr>
					<td align="right">
						<label class="Validform_label">
							最近登录时间:
						</label>
					</td>
					<td class="value">
						<fmt:formatDate value='${user.lastlogin}' type="date"
							pattern="yyyy-MM-dd hh:mm:ss" />
						&nbsp;
					</td>
				</tr>
				<tr>
					<td align="right">
						<label class="Validform_label">
							最近登录IP:
						</label>
					</td>
					<td class="value">
						${user.loginip}&nbsp;
					</td>
				</tr>
			</table>
		</t:formvalid>
	</body>